home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / cgazv5n5.arc / LIST8.C < prev    next >
C/C++ Source or Header  |  1991-09-23  |  617b  |  20 lines

  1. /*---------------------------------------- Listing 8 ------
  2.  * Demonstration of __FILE__ and _LINE__
  3.  * See Listing 1 for copyright notice.
  4.  *-------------------------------------------------------*/
  5. #include <stdio.h>
  6.  
  7. void main ( void );
  8.  
  9. void main()
  10. {
  11.     /*--------------------------------------
  12.      * This will be a fairly dopey program,
  13.      * doing nothing but showing off module 
  14.      * name and line numbers.
  15.      *------------------------------------*/
  16.  
  17.     printf ( "We're in module %s ... ", __FILE__ );
  18.     printf ( "at line number %d\n", __LINE__ );
  19.     printf ( "Neat, huh?!\n" );
  20. }